package Controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import Vista.formPrincipal;

public class ControladorPrincipal implements ActionListener {
	private formPrincipal PantallaPrincipal;

	public ControladorPrincipal() {
		super();
		this.PantallaPrincipal = new formPrincipal();
		this.PantallaPrincipal.setLocationRelativeTo(null);
		this.PantallaPrincipal.setVisible(true);	
		this.PantallaPrincipal.AgregarEscuchadores(this);
	}


	@Override
	public void actionPerformed(ActionEvent e) {
		String evento = e.getActionCommand();
		if(evento.equals("Consultar Planteamientos")){
			new ControladorConsultarPlanteamiento();
		}else if (evento.equals("Registrar Planteamiento")){
			new ControladorRegistrarPlanteamiento();
		}else if (evento.equals("Salir"))
			System.exit(0);
		
	}
}
